import React, { PureComponent } from 'react';
import DescriptionList from '@/components/DescriptionList';
import moment from 'moment';

const { Description } = DescriptionList;
class BasicInfor extends PureComponent {
  render() {
    const { empDimission, detail } = this.props;
    return (
      <div>
        {detail ? (
          <DescriptionList>
            <Description term="客户名称">{empDimission.custName || '--'}</Description>
            <Description term="姓名">{empDimission.empName || '--'}</Description>
            <Description term="证件类型">{empDimission.idTypeName || '--'}</Description>
            <Description term="证件号">{empDimission.idNo || '--'}</Description>
            <Description term="电话">{empDimission.mobile || '--'}</Description>
            <Description term="邮箱">{empDimission.email || '--'}</Description>
            <Description term="服务类型">{empDimission.serTypeName || '--'}</Description>
            <Description term="所属客服">{empDimission.creName || '--'}</Description>
            <Description term="入职日期">
              {empDimission.entryDate ? moment(empDimission.entryDate).format('YYYY-MM-DD') : '--'}
            </Description>
            <Description term="离职日期">
              {empDimission.evaDate ? moment(empDimission.evaDate).format('YYYY-MM-DD') : '--'}
            </Description>
            <Description term="地区">{empDimission.areaName || '--'}</Description>
            <Description term="是否离职联系">{empDimission.contactFlagName || '--'}</Description>
            <Description term="离职原因">{empDimission.dimissionReason || '--'}</Description>
          </DescriptionList>
        ) : (
          <DescriptionList>
            <Description term="姓名">{empDimission.empName || '--'}</Description>
            <Description term="证件号">{empDimission.idNo || '--'}</Description>
            <Description term="电话">{empDimission.contactValue || '--'}</Description>
            <Description term="服务类型">{empDimission.serTypeName || '--'}</Description>
            <Description term="地区">{empDimission.areaName || '--'}</Description>
            <Description term="是否离职联系">{empDimission.contactFlagName || '--'}</Description>
            <Description term="离职日期">
              {moment(empDimission.evaDate).format('YYYY-MM-DD') || '--'}
            </Description>
            <Description term="所属客服">{empDimission.creName || '--'}</Description>
            <Description term="离职原因">{empDimission.dimissionReason || '--'}</Description>
          </DescriptionList>
        )}
      </div>
    );
  }
}

export default BasicInfor;
